#pragma once
#include <tuple>
#include "ImportExport.h"

namespace ja2{ namespace sgp
{
	//! JA2 settings.
	class Settings : boost::noncopyable
	{
		// Constants
	public:
		//! Application name.
		JA2_SGP_API static char const * const APPLICATION_NAME;

		// Typedefs
	private:
		//! <Value, shouldn't be read>.
		typedef std::tuple<bool, bool> BoolType_t;
		//! Resolution tuple (horizontal, vertical).
		typedef std::tuple<std::uint_least16_t, std::uint_least16_t> Resolution_t;

		// Attributes
	private:
		//! Resolution.
		Resolution_t m_Resolution;
		//! Width, height offset.
		Resolution_t m_Offset;
	public:
		//! Enable sound.
		BoolType_t m_Sound;
		//! Is fullscreen.
		BoolType_t m_FullScreen;
		//! Locale.
		std::string m_Locale;
		//! Pixel depth.
		std::uint_least8_t m_PixelDepth;
		//! Play intro.
		bool m_PlayIntro;

		// Operations
	public:
		//! Set resolution type.
		JA2_SGP_API void set_resolution(std::uint_least8_t Type);
		//! Set concrete resolution.
		JA2_SGP_API void set_resolution(std::uint_least16_t Width, std::uint_least16_t Height);
		//! Set offset.
		JA2_SGP_API void set_offset(std::uint_least16_t Width, std::uint_least16_t Height);
		//! Get width from resolution.
		JA2_SGP_API std::uint_least16_t res_width() const;
		//! Get height from resolution.
		JA2_SGP_API std::uint_least16_t res_height() const;
		//! Get offset width.
		JA2_SGP_API std::uint_least16_t offset_width() const;
		//! Get offset height.
		JA2_SGP_API std::uint_least16_t offset_height() const;
		//! Is fullscreen.
		JA2_SGP_API bool is_full_screen() const;

		// Construction/Destruction
	public:
		JA2_SGP_API Settings();
	};
} /*sgp*/} /*ja2*/
